# -*- coding:utf-8 -*-
# @Time   :  15:39
# @Author : jinzhongyi
# @File   : tk2_entry_text.py

import tkinter as tk

window = tk.Tk()
window.title('my window')
window.geometry('200x200')

e = tk.Entry(window, show='*')
e.pack()

def insert_point():
    var = e.get()
    t.insert('insert', var) # 鼠标指针的位置
def insert_end():
    var = e.get()
    # t.insert('end', var)
    t.insert(2.2, var) # 第2行的第2列的位置

b1 = tk.Button(window, text='insert point', width = 15,
               height=2, command=insert_point)
b1.pack()
b2 = tk.Button(window, text='insert end',
               command = insert_end)
b2.pack()

t = tk.Text(window, height = 2)
t.pack()
window.mainloop()
